<%@ page contentType="text/html;charset=UTF-8" %>
<%//@include file="../../common/sessionValidate.jsp" %>
<%//@include file="../../common/taglibs.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>上传文件</title>
    <%//@ include file="meta.jsp"%>
    <!--  <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta http-equiv="X-UA-Compatible" content="IE=9">
  -->
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen" id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">

</head>
<body>
<div class="" style="margin-right:2px;padding-right:1px;">
    <div class="panel panel-primary" id="bsDiv1">
        <!-- Default panel head -->
        <div class="panel-heading  ">
            <i class='icon-upload-alt'></i>&nbsp;请选择要上传的文件
        </div>
        <!-- Default panel body -->
        <div class="panel-body" id="bsDiv" class="panel-collapse collapse in">
            <div class="col-xs-8 col-sm-8  col-md-8 col-lg-8">
                <div class="form-group">
                    <label class="control-label col-md-5"></label>
                    <div class="col-md-7">
                        <form id="uploadForm" method="post" enctype="multipart/form-data" target="hidden_frame">
                            <!-- 由于使用了ssm框架，后台接收是用name绑定的，注意name和后台一致 -->
                            <input type="file" id="file1" name="file1"/>
                            <br>
                            <input type="button" onclick="UpladFile()" value="上传"/> &nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:window.close()"><input type="button" id="buttonqxupload" value="关闭"></a>
                            <input type="hidden" id="returnval" name="returnval" value=""/>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div></div>
<iframe name="hidden_frame" id="hidden_frame" style='display:block; width: 100%; height:60px;' ></iframe>
</body>
</html>

<script src="<%=basePath%>js/jquery-2.1.1.min.js" language="javascript"></script>
<script src="<%=basePath%>js/bootstrap.min.js"></script>
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js"></script>
<script src="<%= basePath %>js/calendar.js"></script>
<script src="<%=basePath%>js/jquery.uploadify.min.js"></script>

<script type="text/javascript">
       function UpladFile() {
           var url = "<%=basePath%>upload/uploadOneFile?time=" + Math.random();
           var a = confirm("您确认上传该文件信息？");
           if (a == true) {
               uploadForm.action = url;
               uploadForm.submit();
               alert("提交上传！");
           }
       }

</script>
